home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / gcc / gcc261c.zoo / objects / eltfuncs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-19  |  2.9 KB  |  86 lines

  1. /* Declarations of functions for dealing with elt unions
  2.    Copyright (C) 1993,1994 Free Software Foundation, Inc.
  3.  
  4.    Written by:  R. Andrew McCallum <mccallum@gnu.ai.mit.edu>
  5.    Date: May 1993
  6.  
  7.    This file is part of the GNU Objective C Class Library.
  8.  
  9.    This library is free software; you can redistribute it and/or
  10.    modify it under the terms of the GNU Library General Public
  11.    License as published by the Free Software Foundation; either
  12.    version 2 of the License, or (at your option) any later version.
  13.    
  14.    This library is distributed in the hope that it will be useful,
  15.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17.    Library General Public License for more details.
  18.  
  19.    You should have received a copy of the GNU Library General Public
  20.    License along with this library; if not, write to the Free
  21.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. */ 
  23.  
  24. #ifndef __eltfuncs_h_INCLUDE_GNU
  25. #define __eltfuncs_h_INCLUDE_GNU
  26.  
  27. #include <objects/stdobjects.h>
  28. #include <objects/elt.h>
  29. #include <stdio.h>
  30.  
  31. extern unsigned int elt_hash_int (elt key);
  32. extern int elt_compare_ints (elt k1, elt k2);
  33.  
  34. extern unsigned int elt_hash_unsigned_int (elt key);
  35. extern int elt_compare_unsigned_ints (elt k1, elt k2);
  36.  
  37. extern unsigned int elt_hash_long_int (elt key);
  38. extern int elt_compare_long_ints (elt k1, elt k2);
  39.  
  40. extern unsigned int elt_hash_unsigned_long_int (elt key);
  41. extern int elt_compare_unsigned_long_ints (elt k1, elt k2);
  42.  
  43. extern unsigned int elt_hash_char (elt key);
  44. extern int elt_compare_chars (elt k1, elt k2);
  45.  
  46. extern unsigned int elt_hash_unsigned_char (elt key);
  47. extern int elt_compare_unsigned_chars (elt k1, elt k2);
  48.  
  49. extern unsigned int elt_hash_short (elt key);
  50. extern int elt_compare_shorts (elt k1, elt k2);
  51.  
  52. extern unsigned int elt_hash_unsigned_short (elt key);
  53. extern int elt_compare_unsigned_shorts (elt k1, elt k2);
  54.  
  55. extern unsigned int elt_hash_float (elt key);
  56. extern int elt_compare_floats (elt k1, elt k2);
  57.  
  58. #if (ELT_INCLUDES_DOUBLE)
  59. extern unsigned int elt_hash_double (elt key);
  60. extern int elt_compare_doubles (elt k1, elt k2);
  61. #endif
  62.  
  63. extern int elt_compare_strings (elt k1, elt k2);
  64. extern unsigned int elt_hash_string (elt key);
  65.  
  66. extern int elt_compare_void_ptrs (elt k1, elt k2);
  67. extern unsigned int elt_hash_void_ptr (elt key);
  68.  
  69. extern unsigned int elt_hash_object (elt key);
  70. extern int elt_compare_objects (elt k1, elt k2);
  71.  
  72.  
  73. /* This returns a (int(*)(elt,elt)) */
  74. extern int (*(elt_get_comparison_function(const char *encoding)))(elt,elt);
  75.  
  76. /* This returns a (unsigned int (*)(elt)) */
  77. extern unsigned int (*(elt_get_hash_function(const char *encoding)))(elt);
  78.  
  79. extern const char *elt_get_encoding(int(*comparison_function)(elt,elt));
  80.  
  81. extern void *elt_get_ptr_to_member(const char *encoding, elt *anElement);
  82.  
  83. extern void elt_fprintf_elt(FILE *fp, const char *encoding, elt anElement);
  84.  
  85. #endif /* __eltfuncs_h_INCLUDE_GNU */
  86.